FROM eclipse-temurin:8-jre-alpine

# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories

ARG DOCKER_IMAGE_TAG
ENV EXEC_VERSION=$DOCKER_IMAGE_TAG

# https://wiki.alpinelinux.org/wiki/Running_glibc_programs
# https://pkgs.alpinelinux.org/packages?name=gcompat&branch=v3.8&repo=&arch=&maintainer=
# RUN set -eux; \
# 	apk add --no-cache \
# 		gcompat \
# 	;

ADD skywalking-agent /opt/skywalking-agent
ADD MyJarFile.jar    /root
ADD run.sh           /root

ENV PATH="$PATH:/opt/skywalking-agent"

WORKDIR /root

CMD ["/bin/sh", "-c", "/root/run.sh"]
